package br.org.bertol.mestrado.engine.optimisation.sls;

import br.org.bertol.mestrado.Verify;
import br.org.bertol.mestrado.engine.optimisation.MetaHeuristica;
import br.org.bertol.mestrado.engine.optimisation.Operacao;
import br.org.bertol.mestrado.engine.optimisation.Unit;
import br.org.bertol.mestrado.engine.optimisation.hillclimbing.HillClimbing;
import br.org.bertol.mestrado.engine.optimisation.pso.TypeMovement;

public abstract class StochasticLocalSearch<U extends Unit> extends
        MetaHeuristica<U> {

    protected final U               startUnit;

    protected U                     betterUnit;

    protected final HillClimbing<U> hillClimbing;

    @SuppressWarnings("unchecked")
    public StochasticLocalSearch(final Verify verify, final long numIteracoes,
        final U startUnit) {
        super(verify, numIteracoes);

        this.startUnit = startUnit;

        hillClimbing = new HillClimbing<U>(verify, null, 25, false,
                (Operacao<U>) TypeMovement.busca_local, null, null);

    }

    public final U getBetterUnit() {
        return betterUnit;
    }

}